package com.naiterui.ehp.bs.pharmacist.entity;

// default package

import javax.persistence.*;

import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * 处方详情：包含部分字段，只供本服务 查询使用，详细已推荐服务为准
 */
@Entity
@Table(name = "dr_medication_recom_detail")
public class PharmacistMedicationRecomDetail implements java.io.Serializable {

    // Fields

    /**
     *
     */
    private static final long serialVersionUID = -590067547740906261L;
    private Long id;
    private Long recommendId;
    private Long pid;
    private Long skuId;
    private String name;
    private String commonName;
    /**
     * 处方合规化药品名称：通用名+规格
     */
    private String recomName;
    private Integer quantity;
    private Date createdAt;
    private Date changedAt;

    /**
     * 商品价格 YC-0827版本新增
     */
    private Integer salePrice;
    /**
     * 用法用量
     */
    private String usages;

    /**
     * 备注
     */
    private String bakup;

    /**
     * 用量周期
     */
    private Double dosageCycle;

    /**
     * 用量周期单位
     */
    private String dosageCycleUnit;

    /**
     * 用量次数
     */
    private String dosageCount;

    /**
     * 每次用量
     */
    private String eachDosageCount;

    /**
     * 每次用量单位
     */
    private String eachDoseUnit;

    /**
     * 用药周期
     */
    private Double drugCycle;

    /**
     * 用药周期单位
     */
    private String drugCycleUnit;

    /**
     * 推荐数量单位
     */
    private String quantityUnit;

    /**
     * 服用方法
     */
    private String usageMethod;

    /**
     * 服用时间
     */
    private String usageTime;

    /**
     * 创建MedicationRecomDetail实例
     *
     * @throws 异常信息
     */
    public PharmacistMedicationRecomDetail() {
        super();
    }

    /**
     * 构造函数
     *
     * @param recommendId
     * @param pid
     * @param skuId
     * @param name
     * @param commonName
     * @param quantity
     * @param createdAt
     * @param changedAt
     * @param usages
     * @param bakup
     * @param dosageCycle
     * @param dosageCycleUnit
     * @param dosageCount
     * @param eachDosageCount
     * @param eachDoseUnit
     * @param drugCycle
     * @param drugCycleUnit
     * @param quantityUnit
     * @param usageMethod
     * @param usageTime
     */
    public PharmacistMedicationRecomDetail(Long recommendId, Long pid, Long skuId, String name, String commonName, String recomName, Integer quantity,
                                           String usages, String bakup, Double dosageCycle, String dosageCycleUnit, String dosageCount, String eachDosageCount,
                                           String eachDoseUnit, Double drugCycle, String drugCycleUnit, String quantityUnit, String usageMethod, String
                                                   usageTime) {
        super();
        this.recommendId = recommendId;
        this.pid = pid;
        this.skuId = skuId;
        this.name = name;
        this.commonName = commonName;
        this.recomName = recomName;
        this.quantity = quantity;
        this.usages = usages;
        this.bakup = bakup;
        this.dosageCycle = dosageCycle;
        this.dosageCycleUnit = dosageCycleUnit;
        this.dosageCount = dosageCount;
        this.eachDosageCount = eachDosageCount;
        this.eachDoseUnit = eachDoseUnit;
        this.drugCycle = drugCycle;
        this.drugCycleUnit = drugCycleUnit;
        this.quantityUnit = quantityUnit;
        this.usageMethod = usageMethod;
        this.usageTime = usageTime;
        createdAt = new Date();
        changedAt = new Date();
    }

    // Property accessors
    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "recommend_id")
    public Long getRecommendId() {
        return recommendId;
    }

    public void setRecommendId(Long recommendId) {
        this.recommendId = recommendId;
    }

    @Column(name = "pid")
    public Long getPid() {
        return pid;
    }

    public void setPid(Long pid) {
        this.pid = pid;
    }

    @Column(name = "sku_id")
    public Long getSkuId() {
        return skuId;
    }

    public void setSkuId(Long skuId) {
        this.skuId = skuId;
    }

    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Column(name = "common_name")
    public String getCommonName() {
        return commonName;
    }

    public void setCommonName(String commonName) {
        this.commonName = commonName;
    }

    @Column(name = "quantity")
    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    @Column(name = "created_at")
    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    @Column(name = "changed_at", length = 19)
    public Date getChangedAt() {
        return changedAt;
    }

    public void setChangedAt(Date changedAt) {
        this.changedAt = changedAt;
    }

    @Column(name = "sale_price")
    public Integer getSalePrice() {
        return salePrice;
    }

    public void setSalePrice(Integer salePrice) {
        this.salePrice = salePrice;
    }

    /**
     * @return String 取得域 usages 的方法。
     */
    @Column(name = "usages")
    public String getUsages() {
        return usages;
    }

    /**
     * @param usages 对域 usages 的设置方法.
     */
    public void setUsages(String usages) {
        this.usages = usages;
    }

    /**
     * @return String 取得域 bakup 的方法。
     */
    @Column(name = "bakup")
    public String getBakup() {
        return bakup;
    }

    /**
     * @param bakup 对域 bakup 的设置方法.
     */
    public void setBakup(String bakup) {
        this.bakup = bakup;
    }

    @Column(name = "dosage_cycle")
    public Double getDosageCycle() {
        return dosageCycle;
    }

    @Column(name = "dosage_cycle_unit")
    public String getDosageCycleUnit() {
        return dosageCycleUnit;
    }

    @Column(name = "dosage_count")
    public String getDosageCount() {
        return dosageCount;
    }

    @Column(name = "each_dosage_count")
    public String getEachDosageCount() {
        return eachDosageCount;
    }

    @Column(name = "each_dose_unit")
    public String getEachDoseUnit() {
        return eachDoseUnit;
    }

    @Column(name = "drug_cycle")
    public Double getDrugCycle() {
        return drugCycle;
    }

    @Column(name = "drug_cycle_unit")
    public String getDrugCycleUnit() {
        return drugCycleUnit;
    }

    @Column(name = "quantity_unit")
    public String getQuantityUnit() {
        return quantityUnit;
    }

    @Column(name = "usage_method")
    public String getUsageMethod() {
        return usageMethod;
    }

    @Column(name = "usage_time")
    public String getUsageTime() {
        return usageTime;
    }

    public void setDosageCycle(Double dosageCycle) {
        this.dosageCycle = dosageCycle;
    }

    public void setDosageCycleUnit(String dosageCycleUnit) {
        this.dosageCycleUnit = dosageCycleUnit;
    }

    public void setDosageCount(String dosageCount) {
        this.dosageCount = dosageCount;
    }

    public void setEachDosageCount(String eachDosageCount) {
        this.eachDosageCount = eachDosageCount;
    }

    public void setEachDoseUnit(String eachDoseUnit) {
        this.eachDoseUnit = eachDoseUnit;
    }

    public void setDrugCycle(Double drugCycle) {
        this.drugCycle = drugCycle;
    }

    public void setDrugCycleUnit(String drugCycleUnit) {
        this.drugCycleUnit = drugCycleUnit;
    }

    public void setQuantityUnit(String quantityUnit) {
        this.quantityUnit = quantityUnit;
    }

    public void setUsageMethod(String usageMethod) {
        this.usageMethod = usageMethod;
    }

    public void setUsageTime(String usageTime) {
        this.usageTime = usageTime;
    }

    @Column(name = "recom_name")
    public String getRecomName() {
        return recomName;
    }

    public void setRecomName(String recomName) {
        this.recomName = recomName;
    }
}